# coding=utf-8
# 代码文件：chapter1/ch1.6.2.py

print('2 * 3 = ', 2 * 3)
print('3 / 2 = ', 3 / 2)
print('3 % 2 = ', 3 % 2)
print('3 // 2 = ', 3 // 2)
print(' -3 // 2 = ', -3 // 2)

a = 10
b = 9

print('a > b = ', a > b)
print('a< b = ', a < b)
print('a>= b = ', a >= b)
print('a<= b = ', a <= b)
print('1.0 == 1 = ', 1.0 == 1)
print('1.0 != 1 = ', 1.0 != 1)

i = 0
a = 10
b = 9

if a > b or i == 1:
    print("或运算为 真")
else:
    print("或运算为 假")

if a < b and i == 1:
    print("与运算为 真")
else:
    print("与运算为 假")

a = 1
b = 2

a += b                              # 相当于a = a + b

print("a + b =", a)                 # a的值为3

a += b + 3                          # 相当于 a = a + b + 3

print("a + b + 3 =", a)             # a的值为8

a -= b                              # 相当于a = a - b
print("a - b =", a)                 # a的值为6

a *= b                              # 相当于a = a * b
print("a * b =", a)                 # a的值为12

a /= b                              # 相当于a = a / b
print("a / b =", a)                 # a的值为6.0

a %= b                              # 相当于a = a % b
print("a % b =", a)                 # a的值为0.0
